'use strict';

const db = uniCloud.database()

exports.main = async (event, context) => {
	try {
		// 简单获取所有商户数据
		const { data } = await db.collection('tenants').get()
		
		return {
			code: 0,
			data: data
		}
	} catch (e) {
		return {
			code: -1,
			message: e.message
		}
	}
}; 